package com.mls.fivedistrict.dao;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.mls.fivedistrict.pojo.Vote;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 投票 Mapper 接口
 * </p>
 *
 * @author Five Team
 * @since 2018-05-15
 */
public interface VoteMapper extends BaseMapper<Vote> {
    Vote selectBySingleId(@Param("voteId") Long voteId);

    Vote selectVoteAndVoteOptions(@Param("voteId") Long voteId);

    List<Vote> selectListAndVoteOption(@Param("ew") Wrapper wrapper);

    long addVoteCount(@Param("id") Long id, @Param("version") Long version, @Param("minDwqAbility") BigDecimal minDwqAbility, @Param("voteCount") int voteCount);
}
